'use strict';

module.exports = app => {
    const { STRING, UUID, UUIDV4, INTEGER } = app.Sequelize;

    const model = app.model.define('dictionary', {
        id: {
            type: UUID,
            defaultValue: UUIDV4,
            primaryKey: true,
            comment: '主键',
        },
        name: {
            type: UUID,
            allowNull: false,
            comment: '名称',
        },
        value: {
            type: STRING,
            comment: '字典值',
        },
        type: {
            type: STRING,
            comment: '类型',
        },
    }, {
            tableName: 'dictionary',
            comment: 'dictionary',
        });

    return model;
};
